home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
AIncludes
/
SystemNotification.a
< prev
next >
Wrap
Text File
|
1996-05-01
|
5KB
|
194 lines
;
; File: SystemNotification.a
;
; Contains: System Notification Service Interfaces.
;
; Version: Technology: System 8
; Release: Universal Interfaces 3.0d3 on Copland DR1
;
; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
;
; Bugs?: If you find a problem with this file, send the file and version
; information (from above) and the problem description to:
;
; Internet: apple.bugs@applelink.apple.com
; AppleLink: APPLE.BUGS
;
;
IF &TYPE('__SYSTEMNOTIFICATION__') = 'UNDEFINED' THEN
__SYSTEMNOTIFICATION__ SET 1
IF &TYPE('__KERNEL__') = 'UNDEFINED' THEN
include 'Kernel.a'
ENDIF
IF &TYPE('__FILEMANAGERTYPES__') = 'UNDEFINED' THEN
include 'FileManagerTypes.a'
ENDIF
IF &TYPE('__NAMEREGISTRY__') = 'UNDEFINED' THEN
include 'NameRegistry.a'
ENDIF
IF FOR_SYSTEM8_PREEMPTIVE THEN
;
; * basic notification data structures and constants
;
kSNSMatchAnyService EQU '****'
kSNSMatchAnyKind EQU '****'
; typedef OSType SNSService
; typedef OSType SNSKind
SNSSubjectVariant RECORD 0
genericSubject ds.b 256 ; offset: $0 (0)
ORG 0
nsObject ds.l 1 ; offset: $0 (0)
ORG 0
fsPersistence ds FSObjectPersistentReference ; offset: $0 (0)
ORG 0
fsObject ds FSEventObjectSubject ; offset: $0 (0)
ORG 0
fsObjectProperty ds FSEventObjectPropertySubject ; offset: $0 (0)
ORG 0
nameRegistryEntry ds RegEntryRef ; offset: $0 (0)
ORG 256
sizeof EQU * ; size: $100 (256)
ENDR
; typedef union SNSSubjectVariant * SNSSubjectVariantPtr
SNSSubject RECORD 0
subjectLength ds.l 1 ; offset: $0 (0)
subject ds SNSSubjectVariant ; offset: $4 (4)
sizeof EQU * ; size: $104 (260)
ENDR
; typedef struct SNSSubject * SNSSubjectPtr
SNSNotificationHeader RECORD 0
service ds.l 1 ; offset: $0 (0)
kind ds.l 1 ; offset: $4 (4)
subject ds SNSSubject ; offset: $8 (8)
subscriberRefCon ds.l 1 ; offset: $10C (268)
infoLength ds.l 1 ; offset: $110 (272)
sizeof EQU * ; size: $114 (276)
ENDR
; typedef struct SNSNotificationHeader * SNSNotificationHeaderPtr
SNSNotification RECORD 0
header ds SNSNotificationHeader ; offset: $0 (0)
info ds.b 1 ; offset: $114 (276) <-- really an array of length one
ORG 278
sizeof EQU * ; size: $116 (278)
ENDR
; typedef struct SNSNotification * SNSNotificationPtr
;
; * producer data structures and constants
;
kSNSFireAndForgetNotification EQU 0
kSNSRequireAllConsumersSucceed EQU $00000001
kSNSRequireOneConsumerSucceed EQU $00000002
; typedef OptionBits SNSProduceOptions
; typedef ObjectID SNSDistributorID
;
; * consumer data structures and constants
;
; typedef ObjectID SNSConsumerID
; typedef OSType SNSConsumerName
;
; * producer interface
;
;
; extern OSStatus SNSFindDistributor(SNSService service, SNSKind kind, Boolean createDistributor, SNSDistributorID *distributor)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION SNSFindDistributor
ENDIF
;
; extern OSStatus SNSProduce(SNSDistributorID distributor, void *notification, ByteCount notificationLength, void *subject, ByteCount subjectLength, SNSProduceOptions options)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION SNSProduce
ENDIF
;
; extern OSStatus SNSProduceAsync(SNSDistributorID distributor, void *notification, ByteCount notificationLength, void *subject, ByteCount subjectLength, SNSProduceOptions options, KernelNotificationPtr completion)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION SNSProduceAsync
ENDIF
;
; * consumer and subscription interface
;
;
; extern OSStatus SNSCreateConsumer(SNSConsumerName name, ItemCount maxPending, SNSConsumerID *consumer)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION SNSCreateConsumer
ENDIF
;
; extern OSStatus SNSDeleteConsumer(SNSConsumerID consumer)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION SNSDeleteConsumer
ENDIF
;
; extern OSStatus SNSSubscribe(SNSConsumerID consumer, SNSService service, SNSKind kind, void *subject, ByteCount subjectLength, void *refCon)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION SNSSubscribe
ENDIF
;
; extern OSStatus SNSUnsubscribe(SNSConsumerID consumer, SNSService service, SNSKind kind, void *subject, ByteCount subjectLength)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION SNSUnsubscribe
ENDIF
;
; extern OSStatus SNSHold(SNSConsumerID consumer, SNSService service, SNSKind kind, void *subject, ByteCount subjectLength)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION SNSHold
ENDIF
;
; extern OSStatus SNSUnhold(SNSConsumerID consumer, SNSService service, SNSKind kind, void *subject, ByteCount subjectLength)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION SNSUnhold
ENDIF
;
; extern OSStatus SNSFlush(SNSConsumerID consumer, SNSService service, SNSKind kind, void *subject, ByteCount subjectLength)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION SNSFlush
ENDIF
;
; extern OSStatus SNSConsume(SNSConsumerID consumer, SNSNotificationPtr notification, ByteCount maxSize)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION SNSConsume
ENDIF
;
; extern OSStatus SNSConsumeAsync(SNSConsumerID consumer, SNSNotificationPtr notification, ByteCount maxSize, KernelNotificationPtr completion)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION SNSConsumeAsync
ENDIF
ENDIF
ENDIF ; __SYSTEMNOTIFICATION__